﻿
namespace FastFood.Business.Entities
{
    using System.Collections.Generic;

    public partial class Combos
    {
        public List<DetalleCombo> DetallesCombo { get; set; }
        public decimal costo
        {
            get
            {
                if (this.DetallesCombo != null)
                {
                    decimal total = 0;
                    foreach (DetalleCombo detalle in this.DetallesCombo)
                    {
                        total += detalle.costoTotal;
                    }
                    return total;
                }
                return 0;
            }

        }
        public decimal precioPreparables
        {
            get
            {
                if (this.DetallesCombo != null)
                {
                    decimal total = 0;
                    foreach (DetalleCombo detalle in this.DetallesCombo)
                    {
                        total += detalle.precioTotal;
                    }
                    return total;
                }
                return 0;
            }

        }
    }
}
